
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_OUTPUT_DIR}/Demo/Lib")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_OUTPUT_DIR}/Demo/Lib")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_OUTPUT_DIR}/Demo/Bin")

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/include/msvc)
include_directories(${PROJECT_OUTPUT_DIR}/ImageProcessing/Include)
include_directories(${PROJECT_OUTPUT_DIR}/HpmipGL/Include)
include_directories(${PROJECT_OUTPUT_DIR}/Hpmip/Include)
include_directories(${PROJECT_OUTPUT_DIR}/IO/Include)

if(MSVC60)
	SET(wxLIB_POSTFIX "vc-6.0")
endif(MSVC60)
	
if(MSVC80)
	SET(wxLIB_POSTFIX "vc-8.0")
endif(MSVC80)

if(MSVC90)
	SET(wxLIB_POSTFIX "vc-9.0")	
endif(MSVC90)

link_directories(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/lib/${wxLIB_POSTFIX})
link_directories(${PROJECT_OUTPUT_DIR}/Hpmip/Lib/Debug )
link_directories(${PROJECT_OUTPUT_DIR}/Hpmip/Lib/Release)
link_directories(${PROJECT_OUTPUT_DIR}/IO/Lib/Debug )
link_directories(${PROJECT_OUTPUT_DIR}/IO/Lib/Release)
link_directories(${PROJECT_OUTPUT_DIR}/ImageProcessing/Lib/Debug)
link_directories(${PROJECT_OUTPUT_DIR}/ImageProcessing/Lib/Release)
link_directories("${PROJECT_OUTPUT_DIR}/Glew/Lib/Debug ")
link_directories("${PROJECT_OUTPUT_DIR}/Glew/Lib/Release")

#copyfile(${PROJECT_OUTPUT_DIR}/XSD/bin ${PROJECT_OUTPUT_DIR}/Hpmip/Bin/Debug/ xerces-c_3_0D_vc90.dll) 
#copyfile(${PROJECT_OUTPUT_DIR}/Hpmip/bin/Debug ${PROJECT_OUTPUT_DIR}/Hpmip/Bin/Debug/ ImageLayoutPlugin_CPU_Linear_d.dll)
#copyfile(${PROJECT_OUTPUT_DIR}/Hpmip/bin/Debug ${PROJECT_OUTPUT_DIR}/Hpmip/Bin/Debug/ HpmipCore-vc9d.dll) 
#copyfile(${PROJECT_OUTPUT_DIR}/Hpmip/bin/Debug ${PROJECT_OUTPUT_DIR}/Hpmip/Bin/Debug/ HpmipVisualization-vc9d.dll) 
#copyfile(${PROJECT_OUTPUT_DIR}/Hpmip/bin/Debug ${PROJECT_OUTPUT_DIR}/Hpmip/Bin/Debug/ GraphicImageRenderer_GDI_d.dll) 
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/Src ${PROJECT_OUTPUT_DIR}/Demo/Bin/Debug/ First.htm) 
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/Src ${PROJECT_OUTPUT_DIR}/Demo/Bin/Debug/ Second.htm) 

copyfile(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/bin/${wxLIB_POSTFIX} ${PROJECT_OUTPUT_DIR}/Demo/Bin/Debug wxmsw28d_html_vc_custom.dll)
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/bin/${wxLIB_POSTFIX} ${PROJECT_OUTPUT_DIR}/Demo/Bin/Debug wxmsw28d_gl_vc_custom.dll)
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/bin/${wxLIB_POSTFIX} ${PROJECT_OUTPUT_DIR}/Demo/Bin/Debug wxmsw28d_core_vc_custom.dll)
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/bin/${wxLIB_POSTFIX} ${PROJECT_OUTPUT_DIR}/Demo/Bin/Debug wxmsw28d_aui_vc_custom.dll)
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/bin/${wxLIB_POSTFIX} ${PROJECT_OUTPUT_DIR}/Demo/Bin/Debug wxmsw28d_adv_vc_custom.dll)
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/bin/${wxLIB_POSTFIX} ${PROJECT_OUTPUT_DIR}/Demo/Bin/Debug wxbase28d_vc_custom.dll)

#copyfile(${PROJECT_OUTPUT_DIR}/XSD/bin ${PROJECT_OUTPUT_DIR}/Hpmip/Bin/Release/ xerces-c_3_0_vc90.dll) 
#copyfile(${PROJECT_OUTPUT_DIR}/Hpmip/bin/Release ${PROJECT_OUTPUT_DIR}/Hpmip/Bin/Release/ ImageLayoutPlugin_CPU_Linear.dll)
#copyfile(${PROJECT_OUTPUT_DIR}/Hpmip/bin/Release ${PROJECT_OUTPUT_DIR}/Hpmip/Bin/Release/ HpmipCore-vc9.dll) 
#copyfile(${PROJECT_OUTPUT_DIR}/Hpmip/bin/Release ${PROJECT_OUTPUT_DIR}/Hpmip/Bin/Release/ HpmipVisualization-vc9.dll) 
#copyfile(${PROJECT_OUTPUT_DIR}/Hpmip/bin/Release ${PROJECT_OUTPUT_DIR}/Hpmip/Bin/Release/ GraphicImageRenderer_GDI.dll) 
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/Src ${PROJECT_OUTPUT_DIR}/Demo/Bin/Release/ First.htm) 
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/Src ${PROJECT_OUTPUT_DIR}/Demo/Bin/Release/ Second.htm) 

copyfile(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/bin/${wxLIB_POSTFIX} ${PROJECT_OUTPUT_DIR}/Demo/Bin/Release wxmsw28_html_vc_custom.dll)
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/bin/${wxLIB_POSTFIX} ${PROJECT_OUTPUT_DIR}/Demo/Bin/Release wxmsw28_gl_vc_custom.dll)
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/bin/${wxLIB_POSTFIX} ${PROJECT_OUTPUT_DIR}/Demo/Bin/Release wxmsw28_core_vc_custom.dll)
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/bin/${wxLIB_POSTFIX} ${PROJECT_OUTPUT_DIR}/Demo/Bin/Release wxmsw28_aui_vc_custom.dll)
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/bin/${wxLIB_POSTFIX} ${PROJECT_OUTPUT_DIR}/Demo/Bin/Release wxmsw28_adv_vc_custom.dll)
copyfile(${CMAKE_CURRENT_SOURCE_DIR}/wxWidgets-2.8.10/bin/${wxLIB_POSTFIX} ${PROJECT_OUTPUT_DIR}/Demo/Bin/Release wxbase28_vc_custom.dll)


FOREACH(cfg ${CMAKE_CONFIGURATION_TYPES})
      FILE(MAKE_DIRECTORY "${PROJECT_OUTPUT_DIR}/Demo/Lib/${cfg}")
ENDFOREACH(cfg)


subdirs(Src)